package com.college.heyuhua.dao;

import com.college.heyuhua.model.LostInfo;
import com.college.heyuhua.model.Thanks;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

/**
 * Created by 赵东坡 on 2019/2/5.
 * Time:23:28
 * 宇宙无敌赵牛逼，祈求永无bug
 */
@Mapper
@Component
public interface ThanksMapper {


    @Insert("<script>" +
            "insert into thanks (tusername,thankscontext) " +
            " values( #{t.tusername},#{t.thankscontext}) " +
            "</script>")
    boolean insertThanksInfo(@Param("t") Thanks thanks);

    @Select("<script>" +
            "select * " +
            "from thanks " +
            "order by tid desc " +
            "limit 1 " +
            "</script>")
    Thanks getOneThanks();

}
